﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="OrdersForBranches.aspx.cs" Inherits="Deliver_DeliverOrders" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <h2>
        总行快递待分发的订单</h2>
    <div class="searchcondition">
        <table class="searchtb">
            <tr>
                <td>
                    月份 &nbsp;<asp:DropDownList runat="server" ID="AuditMonth">
                        <asp:ListItem Value="999" Selected="True">所有月份</asp:ListItem>
                        <asp:ListItem>1</asp:ListItem>
                        <asp:ListItem>2</asp:ListItem>
                        <asp:ListItem>3</asp:ListItem>
                        <asp:ListItem>4</asp:ListItem>
                        <asp:ListItem>5</asp:ListItem>
                        <asp:ListItem>6</asp:ListItem>
                        <asp:ListItem>7</asp:ListItem>
                        <asp:ListItem>8</asp:ListItem>
                        <asp:ListItem>9</asp:ListItem>
                        <asp:ListItem>10</asp:ListItem>
                        <asp:ListItem>11</asp:ListItem>
                        <asp:ListItem>12</asp:ListItem>
                    </asp:DropDownList>
                    &nbsp;
                </td>
                <td>
                    注册地
                    <asp:DropDownList ID="DropDownList1" runat="server" AppendDataBoundItems="True" 
                        DataSourceID="SqlDataSource1" DataTextField="RegionName" 
                        DataValueField="RegionID">
                        <asp:ListItem Value="999">所有注册地</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>分行<asp:DropDownList ID="DropDownList2" runat="server" 
                        AppendDataBoundItems="True" DataSourceID="ObjectDataSource1" 
                        DataTextField="BranchName" DataValueField="BranchID">
                    <asp:ListItem Value="999">所有分行</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td>业务类型<asp:DropDownList ID="DropDownList3" runat="server" 
                        AppendDataBoundItems="True" DataSourceID="ObjectDataSource2" 
                        DataTextField="DelegateName" DataValueField="DelegateType" Height="16px">
                    <asp:ListItem Value="999">所有业务</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
        </table>
        <div style="text-align: right;margin: 3px;">
            
            <asp:Button ID="Button1" runat="server" Text="查询" 
                        onclick="Button1_Click" /></div>
    </div>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="commongv">
        <Columns>
            <asp:BoundField DataField="OrderID" HeaderText="订单编号" SortExpression="OrderID" />
            <asp:BoundField DataField="下单时间" HeaderText="下单时间" SortExpression="下单时间" DataFormatString="{0:yyyy-MM-dd}" />
            <asp:BoundField DataField="公司英文名" HeaderText="公司英文名" SortExpression="公司英文名" />
            <asp:BoundField DataField="注册地" HeaderText="注册地" SortExpression="注册地" />
            <asp:BoundField DataField="分行" HeaderText="分行" SortExpression="分行" />
            <asp:BoundField DataField="业务员" HeaderText="业务员" SortExpression="业务员" />
            <asp:BoundField DataField="货币类型" HeaderText="货币类型" SortExpression="货币类型" />
            <asp:BoundField DataField="金额" HeaderText="金额" SortExpression="金额" DataFormatString="{0:0}" />
            <asp:BoundField DataField="业务类型" HeaderText="业务类型" SortExpression="业务类型" />
            <asp:HyperLinkField HeaderText="操作" Text="处理" DataNavigateUrlFields="OrderID" DataNavigateUrlFormatString="HandleOrderForBranch.aspx?key={0}" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:KOONCRMDB %>" 
        SelectCommand="SELECT [RegionName], [RegionID] FROM [Region]"></asp:SqlDataSource>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="GetBranches" 
        TypeName="Koonsoft.HYCRM.BLL.BranchBLL"></asp:ObjectDataSource>
    <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="GetDelegates" 
        TypeName="Koonsoft.HYCRM.BLL.DelegateBLL"></asp:ObjectDataSource>
</asp:Content>
